unit ufmeUserInfo;

interface

uses
  Classes, Controls, Forms, DB, ADODB, StdCtrls, DBCtrls, DBClient,
  Provider, Mask;

type
  TfmeUserInfo = class(TFrame)
    lblAddUser: TLabel;
    lblEditUser: TLabel;
    lblAddDate: TLabel;
    lblEditDate: TLabel;
    dbedtAddUser: TDBEdit;
    adsAddUser: TADODataSet;
    dsAddUser: TDataSource;
    dbedtEditUser: TDBEdit;
    dsEditUser: TDataSource;
    dbedtAddDate: TDBEdit;
    dbedtEditDate: TDBEdit;
    dspAddUser: TDataSetProvider;
    cdsAddUser: TClientDataSet;
    cdsEditUser: TClientDataSet;
    cdsAddUserUSER_ID: TLargeintField;
    cdsAddUserUSER_NM: TStringField;
    cdsEditUserUSER_ID: TLargeintField;
    cdsEditUserUSER_NM: TStringField;
    procedure cdsAddUserAfterOpen(DataSet: TDataSet);
    procedure cdsAddUserAfterClose(DataSet: TDataSet);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

implementation



{$R *.dfm}

procedure TfmeUserInfo.cdsAddUserAfterOpen(DataSet: TDataSet);
var
  sMasterFields: string;
begin
  sMasterFields := cdsEditUser.MasterFields;
  cdsEditUser.CloneCursor(cdsAddUser, False);
  cdsEditUser.MasterFields := sMasterFields;
  cdsEditUser.Refresh;
end;

procedure TfmeUserInfo.cdsAddUserAfterClose(DataSet: TDataSet);
begin
  cdsEditUser.Close;
end;

end.

